home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / ITOB.HDR < prev    next >
Text File  |  1994-04-25  |  1KB  |  38 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _IToB( nInteger, nMax ) --> nInteger
  8.  
  9. PARAMETERS:
  10.  
  11. nInteger : Integer to convert to binary INTEGER
  12. nMax     : Maximum Number of Binary Digits to use (See Description)
  13.  
  14. SHORT:
  15.  
  16. Convert a base 10 integer to binary (base 2).
  17.  
  18. DESCRIPTION:
  19.  
  20. _IToB() accepts an integer and returns an integer representing the
  21. binary equivalent.  Leading zeros are not provided.  If you need them, pad
  22. the result to the desired length.
  23.  
  24. The largest known possible integer that can be so converted is: 65,536.
  25.  
  26. NOTE:
  27.  
  28. See _IToBS() (Integer to Binary String) for conversions resulting in
  29. greater than 16 binary digits (65,536d).  _IToBS() can convert integer
  30. values resulting in up to 52 binary digits.
  31.  
  32. EXAMPLE:
  33.  
  34. t = _itob(13)
  35. Result: t = 1101
  36.  
  37. ******************************************************************************/
  38.